package com.rcn.core.security;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class SecurePassword {
	public static byte[] hash(String password) throws NoSuchAlgorithmException {
	    MessageDigest sha256 = MessageDigest.getInstance("SHA-256");        
	    byte[] passBytes = password.getBytes();
	    byte[] passHash = sha256.digest(passBytes);
	    return passHash;
	}
}
